<template>
  <right-template :title="componentData.title" :tabName="componentData.tabName">
    <el-form class="right-table">
      <!-- <textarea-normal label="表格的html内容" placeholder="<div><span style=''>$rank$</span></div>" v-model="commonAttr.vhtml" @change="onChangeAttr"></textarea-normal> -->
      <dropdown-normal label="表格类型" :valLists="TABLE_ITEM_TYPE" v-model="commonAttr.itemType" @change="onChangeAttr"></dropdown-normal>
      <!-- <input-normal label="数据绑定键值" placeholer="rank,name,count" v-model="commonAttr.tableKeys" @change="onChangeAttr"></input-normal> -->
      <input-normal label="显示条数" placeholer="大于0" v-model="commonAttr.displayNum" @change="onChangeAttr"></input-normal>
      <switch-normal label="显示滚动条" v-model="commonAttr.isScrollable"  @change="onChangeAttr"></switch-normal>
      <dropdown-normal v-if="commonAttr.isScrollable" label="滚动条颜色" :valLists="SCROLLBER_TYPE" v-model="commonAttr.scrollbarType" @change="onChangeAttr"></dropdown-normal>
    </el-form>
  </right-template>
</template>

<script>
  import RightTemplate from '@/views/child/right/right-template.vue'
  import InputNormal from '@/views/components/edit/InputNormal.vue'
  import SwitchNormal from '@/views/components/edit/SwitchNormal.vue'
  import DropdownNormal from '@/views/components/edit/DropdownNormal.vue'

  import { mapActions, mapState } from 'vuex'
  import { editUtils } from '@/views/js/edit-utils'
  import { TABLE_ITEM_TYPE } from '@/common/const-table'

  export default {
    name: "RightTable",
    mixins: [editUtils],
    setup () {
      return {
        TABLE_ITEM_TYPE: TABLE_ITEM_TYPE,
      }
    },
    created() {},
    components: {
      RightTemplate,
      // TextareaNormal,
      InputNormal, 
      SwitchNormal,
      DropdownNormal
    },
    methods: {
      ...mapActions({
      }),
    },
    computed: {
      ...mapState({
      }),
    },
  };
</script>
<style lang="scss">
</style>
